import { buildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  // 获取页面模块列表
  getPageModuleList: {
    url: '/api/v1/base/page_module',
    method: 'get'
  },
  //添加页面模块
  addPageModuleData: {
    url: '/api/v1/base/page_module',
    method: 'post'
  },
  //编辑页面模块
  editPageModuleData: {
    url: '/api/v1/base/page_module',
    method: 'put',
    type: 'restful'
  },
  //删除页面模块
  delPageModuleData: {
    url: '/api/v1/base/page_module',
    method: 'delete',
    type: 'restful'
  },
  //获取页面
  getPageTree: {
    url: '/api/v1/base/page_made/page_tree',
    method: 'get'
  },
  getModelUrl: {
    url: '/api/v1/project/project_model',
    methods: 'get',
    type: 'restful'
  },
  // 动态模块-获取项目动态数据
  getProjectData: {
    url: '/api/v1/base/sms_list',
    method: 'get'
  },
  // 动态模块-获取行业动态和企业新闻
  getIndustryNewData: {
    url: '/api/v1/base/cms_index',
    method: 'get'
  },
  // 获取单位统计数据
  // getStatData: {
  //   url: '/admin/stat/single',
  //   method: 'get'
  // },
  // 获取楼层数据
  getBdComponentData: {
    url: '/admin/stat/getBdComponent',
    method: 'get'
  },
  // 获取项目列表
  getProjectList: {
    url: '/api/v1/project/project_list',
    method: 'get'
  },
  //获取地图数据以及tabs“项目列表”->获取列表数据
  postMapData: {
    url: '/admin/project/getProjectList',
    method: 'post'
  },
  //获取数组面板组件模块公共接口
  getCommonDigitalData: {
    url: '/api/v1/module/module/digital',
    method: 'get'
  },
  //获取图表面板组件模块公共接口
  getCommonChartData: {
    url: '/api/v1/module/module/chart',
    method: 'get'
  },
  //获取资讯详情列表（动态）
  getConsultList: {
    url: '/api/v1/base/cms_list',
    method: 'get'
  },
  //添加资讯
  saveInformation: {
    url: '/api/v1/base/cms',
    method: 'post'
  },
  //获取动态详情
  getDynamicDetails: {
    url: '/api/v1/base/cms',
    method: 'get',
    type: 'restful'
  },
  //编辑资讯
  updateDynamic: {
    url: '/api/v1/base/cms',
    method: 'put',
    type: 'restful'
  },
  //删除资讯
  deleteInformation: {
    url: '/api/v1/base/cms',
    method: 'delete',
    type: 'restful'
  },
  //发布资讯
  informationRelease: {
    url: '/api/v1/base/cms_release',
    method: 'put',
    type: 'restful'
  }
}

export default buildService(settings)
